﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Perfil.ascx.cs" Inherits="Avanservices.ControlPanel.Perfil" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<h1 style="padding-left:10px;">
    <asp:Label ID="LblTitulo" runat="server"></asp:Label>
</h1>
<h2 style="padding-left:10px;">
    <asp:Label ID="LblMensaje" runat="server"></asp:Label>
</h2>
    
<table id="TablaListado" runat="server" class="tablaFormulario" visible="true">
<tr>
    <td>
        <asp:DataGrid ID="gridDatos" runat="server" AutoGenerateColumns="False" 
            Width="100%" AllowPaging="true" PageSize="20" 
            onpageindexchanged="gridDatos_PageIndexChanged" >
            <PagerStyle Mode="NumericPages" HorizontalAlign="Right" />
            <AlternatingItemStyle BackColor="#CCCCCC" CssClass="contenidoGrid" />
            <Columns>
                <asp:BoundColumn DataField="nombre"     HeaderText="Nombre"     HeaderStyle-CssClass="cabeceraGrid" ItemStyle-CssClass="contenidoGrid" ></asp:BoundColumn>
                <asp:BoundColumn DataField="estatus"    HeaderText="Estatus"    HeaderStyle-CssClass="cabeceraGrid" ItemStyle-CssClass="contenidoGrid" ItemStyle-HorizontalAlign="Center" ></asp:BoundColumn>
                <asp:TemplateColumn HeaderText="Editar">
                    <HeaderStyle CssClass="cabeceraGrid"  Width="60px"/>
                    <ItemStyle CssClass="contenidoGrid" HorizontalAlign="Center" />                   
                    <ItemTemplate>
                        <asp:linkButton runat="server" ID="linkEditar" CssClass='<%# Convert.ToString(DataBinder.Eval(Container.DataItem,"id")) %>' OnClientClick="get_item(this.id)" CausesValidation="False"><img src='../images/control_panel/editar.png' width='24px' border='0'></asp:linkButton>                                                       
                    </ItemTemplate>                                                    
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Eliminar">
                    <HeaderStyle CssClass="cabeceraGrid"  Width="60px"/>
                    <ItemStyle CssClass="contenidoGrid" HorizontalAlign="Center" />                   
                    <ItemTemplate>
                        <asp:linkButton runat="server" ID="linkEliminar" CssClass='<%# Convert.ToString(DataBinder.Eval(Container.DataItem,"id")) %>' OnClientClick="get_item(this.id)" CausesValidation="False"><img src='../images/control_panel/eliminar.png' width='24px' border='0'></asp:linkButton>                                                       
                    </ItemTemplate>                                                    
                </asp:TemplateColumn>
            </Columns>
        </asp:DataGrid>
    </td>
</tr>
<tr>
    <td>
        <asp:linkButton ID="linkNuevo"    runat="server" CssClass="botonFormulario" Height="20px" Width="72px" CausesValidation="False">&nbsp;&nbsp;Nuevo&nbsp;&nbsp;</asp:linkButton>
    </td>
</tr>
</table>

<br />
<table class="tablaFormulario" runat="server" id="TablaDatos" cellpadding="0" cellspacing="5" border="0" visible="false">
<tr>
    <td>
        <b>
            * Nombre:
        </b>
    </td>
    <td colspan="2">
        <asp:TextBox ID="txtNombre" runat="server" Width="300px" MaxLength="50"></asp:TextBox>
        <asp:RequiredFieldValidator ID="ValidatorNombre" runat="server" 
            ControlToValidate="txtNombre"
            ErrorMessage="*">
        </asp:RequiredFieldValidator>
    </td>
</tr>
<tr>
    <td>
        <b>
            &nbsp;&nbsp;&nbsp;Descripcion:
        </b>
    </td>
    <td colspan="2">
        <asp:TextBox ID="txtDescripcion" runat="server" Width="300px" Height="100px" MaxLength="200" TextMode="MultiLine" ></asp:TextBox>
    </td>
</tr>
<tr>
    <td colspan="2">
        <h3>Permisología</h3>
    </td>
</tr>
<tr>
    <td colspan="2">
        <cc1:Accordion ID="AccordionPermisos" runat="server" SuppressHeaderPostbacks="true"
                        RequireOpenedPane="false" FramesPerSecond="40" TransitionDuration="250" 
                        FadeTransitions="true" AutoSize="None" ContentCssClass="accordionContent"
                        HeaderCssClass="accordionHeader">
        </cc1:Accordion>
    </td>
</tr>
<tr>
    <td>
        <b>
            * Estatus:
        </b>
    </td>
    <td colspan="2">
        <asp:DropDownList ID="ddlEstatus" runat="server">
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="ValidatorEstatus" runat="server"
            ControlToValidate="ddlEstatus" ErrorMessage="*" 
            InitialValue="0" SetFocusOnError="True">
        </asp:RequiredFieldValidator>
        <br />
    </td>
</tr>
<tr>
    <td colspan="2">
        <br />
        <b>
            (*) Campos obligatorios
        </b>
        <br /><br />
    </td>
</tr>
</table>

<table class="tablaFormulario" runat="server" id="TablaBotones" cellpadding="0" cellspacing="5" border="0" visible="false">
<tr>
    <td align="left">
        <asp:linkButton ID="linkAceptar"    runat="server" CssClass="botonFormulario" Height="20px" Width="72px" onclick="linkAceptar_Click">Aceptar</asp:linkButton>
        <asp:linkButton ID="linkCancelar"   runat="server" CssClass="botonFormulario" Height="20px" Width="72px" CausesValidation="False" onclick="linkCancelar_Click">Cancelar</asp:linkButton>
    </td>
    <td>
        <asp:Label ID="lblAccion" runat="server" Visible="false"></asp:Label>
        <asp:HiddenField ID="Accion" runat="server" />                               
    </td>
</tr>
</table>

<table class="tablaFormulario" runat="server" id="TablaMensaje" cellpadding="0" cellspacing="5" border="0" visible="false">
<tr>
    <td>
        <h2 style="text-align:center;">
            <asp:Label ID="LblMensaje2" runat="server" ></asp:Label>
        </h2>
        <br />
    </td>
</tr>
<tr>
    <td>
        <asp:linkButton ID="linAceptar2"   runat="server" CssClass="botonFormulario" Height="20px" Width="72px" CausesValidation="False" onclick="linkAceptar2_Click">Aceptar</asp:linkButton>
    </td>
</tr>
</table> 

<asp:HiddenField ID="Item_Id" runat="server" /> 

